<template>
    <div class="phone_c">
        <Header :activIndex = "2"></Header>
        <!-- <div class="top_big">
            <img :src="banImg" alt="">
        </div> -->
        <div class="main_width">          
            <div class="nav"> <myBread :breadList="breadList"></myBread></div>
            <div class="tit">
                <!-- {{msg.ruleTitle}} -->
                成交公告
            </div>
            <div class="tc mt_20">{{datas.createDate}}</div>
            <div class="content">
              <table class="table_detail">
                    <tr class="flex ">
                        <td class="headColor"> <span>标的编号</span></td>
                        <td><span>{{datas.subjectNum}}</span></td>
                        <td class="headColor"><span>标的名称</span></td>
                        <td><span>{{datas.subjectName}}</span></td>
                    </tr>
                      <tr class="flex ">
                          <!-- 2投资方名称 -->
                        <td class="headColor"><span>{{ datas.subjectType == 2?'投资方名称':'转让标的评估结果（元） '  }}</span></td>
                        <td><span>{{datas.subjectType == 2? datas.investorName:datas.evaluateResult}}</span></td>
                        <!-- 2投资金额（元）   4租赁底价（元）-->
                        <td class="headColor"><span>{{ datas.subjectType == 4?'租赁底价（元）':datas.subjectType == 2?'投资金额（元）':'转让底价（元） '  }}</span></td>
                        <td><span>{{ datas.reservePrice  }}</span></td>
                    </tr> 
                      <tr class="flex ">
                          <!-- 2持股比例   -->
                        <td class="headColor"><span>{{ datas.subjectType == 2?'持股比例 ':'交易价格（元）'  }}</span></td>
                        <td><span>{{ datas.subjectType == 2?datas.shareholdyRatio:datas.tradingPrice }}</span></td>
                    </tr>                                               
                </table>
            </div>
        </div>
    </div>
</template>
<script>
    import myBread from "~/components/bread";
    import Header from "~/components/header"
    export default {
        components: {
            myBread,  
            Header
        },      
        data(){
            return {
                datas:{},
                banImg:'',
                breadList: [Array],
            }
        },
        mounted(){
            this.getData(this.$route.query.id)
        },        
        methods:{
            getBreadcrumb(title) {
                let matched = this.$route.matched;
                // console.log(matched)
                matched[0].meta.title = title;
                matched = [
                    { path: "/", meta: { title: "首页" } },
                    { path: "/projectAnnouncement", meta: { title: "公告" } }
                ].concat(matched);
                this.breadList = matched;
            },            
            getData(id){
                this.get('/info/announcement/subjectClinch/'+id).then(data=>{
                    this.datas= data;
                    this.getBreadcrumb(this.datas.subjectName);
                });
            }
        }
    }
</script>
<style lang="scss" scoped>
    .content{
        line-height: 20px;
        padding: 30px 0;
        min-height: 400px;
    }
    .tit{
        font-size: 15px;
        text-align: center;
        background: #EEEEEE;
        padding: 10px 0;
        border-bottom: 1px solid #2C9F45;
        letter-spacing:3px;
    }
</style>  